<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hello_react</title>
</head>
<body>
<div id="test">

</div>
</body>
</html>

<!--引入react核心库-->
<script type="text/javascript" src="../Js/react.development.js"></script>
<!--引入react-dom库,用于支持react操作dom-->
<script type="text/javascript" src="../Js/react-dom.development.js"></script>
<!--引入babel库,用于将jsx转成js-->
<script type="text/javascript" src="../Js/babel.min.js"></script>

<script type="text/babel">//此处一定要写text/babel，将jsx转成js
// 创建虚拟DOM
const VDOM=<h1><span id="title">hello react</span></h1>//此处一定不要写引号，因为不是字符串

// 渲染虚拟DOM到页面
// ReactDOM.render(虚拟dom,容器)
ReactDOM.render(VDOM,document.getElementById("test"))
</script>